package com.zhku.goods.feignclient;


import com.zhku.base.model.RestResponse;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class OrdersClientFactory implements FallbackFactory<OrdersClient> {
    @Override
    public OrdersClient create(Throwable throwable) {
        return new OrdersClient() {
            @Override
            public boolean verifyEvaluate(VerifyEvaluateDto verifyEvaluateDto) {
                log.debug("调用订单服务--校验用户是否有资格评价商品熔断异常:{}", throwable.getMessage());
                return false;
            }
        };
    }
}
